const express = require('express');
const router = express.Router();
const auth = require('../middleware/auth');
const adminAuth = require('../middleware/adminAuth');
const reportController = require('../controllers/reportController');

// 创建举报
router.post('/', auth, reportController.createReport);

// 获取我的举报列表
router.get('/my', auth, reportController.getMyReports);

// 管理员获取所有举报
router.get('/', auth, adminAuth, reportController.getAllReports);

// 管理员获取举报统计信息
router.get('/stats', auth, adminAuth, reportController.getReportStats);

// 管理员批量处理举报
router.post('/batch', auth, adminAuth, reportController.handleReportsBatch);

// 管理员处理举报
router.put('/:id', auth, adminAuth, reportController.handleReport);

// 获取举报详情
router.get('/:id', auth, reportController.getReportDetail);

module.exports = router; 